package com.zh.mybatis.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author ZH
 * @date 20:42 2021/11/16
 */
@Getter
@Setter
public abstract class BaseEntity implements Serializable {

    @TableField(fill = FieldFill.INSERT)
    protected LocalDateTime createTime;

    @TableField(fill = FieldFill.UPDATE)
    protected LocalDateTime updateTime;

    @TableField(fill = FieldFill.INSERT)
    protected String creator;

    @TableField(fill = FieldFill.UPDATE)
    protected String updater;

    @TableLogic
    protected boolean deleted;

}
